package com.seecen.day03;


import javax.swing.JFrame;

public class MyJFrame {
    public static void main(String args[]){
        javax.swing.JFrame jf=new javax.swing.JFrame();
        //设置窗口标题
        jf.setTitle("思诚游戏");
        jf.setSize(1024,800);
        //设置窗口可见
        jf.setVisible(true);
        //设置窗口关闭程序结束
        jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        MyJpanel jp=new MyJpanel();
        jf.add(jp);
        //添加画板到线程中
        Thread thread=new Thread(jp);
        thread.start();
        jf.addKeyListener(jp);
        jf.requestFocus();
    }
}
